<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=windows-1252"></HEAD>
<BODY><PRE>


<?php
include('fish-config.php');
$lang = getenv('HTTP_ACCEPT_LANGUAGE');
if ( $lang != '' ) {
 $lang = preg_replace('/(;q=[0-99]+.[0-99]+)/i','',$lang);
 $lang_array = explode(",", $lang);
 if ( substr ($lang, 0, 2) != 'xx' ) {
 $i=0;
		while ($i != '100') {
		$x=0;
		$language = strtolower($lang_array[$i]);
		$language = substr ($language, 0, 2);
		if ( $lang_array[$i] != '' )
    		{
    			while ($x != $count)
    			{
    			if ( $language == $choice[$x] )
				      {	$first_lang = $language;
					$redirect = $target[$x];
					$x = $count-1;
					$i = 99;
				      }
			$x++;
			}
		}
		else  {	$first_lang = $standard_lang;
			$redirect = $main_target;
			$i = 99;
			}
		$i++;
		}
	header("HTTP/1.1 303 See Other");
 }
 else  { $domain = 'http://www.example.com/';
	 $redirect = 'error/bad-request.html';
	header("HTTP/1.1 400 Bad Request");}
 header("Location: " . $domain . $redirect );
}
else  {	$domain = 'http://www.example.com/';
	$redirect = 'babel/index.html';
	header("HTTP/1.1 303 See Other");
	header("Location: " . $domain . $redirect );
}
exit;
?>

</PRE></BODY></HTML>
